ActionController::Routing::Routes.draw do |map|
  map.resources :colors
  map.resources :pcates,:has_many=>:properties
  map.resources :pcates,:has_many=>:products
  map.resources :products,:member=>{:confirm=>:get,:favorite=>:get,:reomve_favorite=>:post},
    :collection=>{:newest_product=>:get,:create_from_flash=>:get},:has_many=>:pcolors
  map.resources :photos
  map.resources :withdraws
  map.resources :backgrounds

  map.resources :logistics,:member=>{:edit_province=>:get}
  map.resources :rssfeeds

  map.resources :designs,:collection=>{:male=>:get,:female=>:get,:resize=>:get,
    :change_cate=>:get,:admin=>:get,:reactive=>:post}
  map.resources :styles,:collection=>{:admin=>:get,:reactive=>:post},:has_many=>:materials
  map.resources :articles
  map.connect '', :controller => "store"
  map.resources :orders,:member=>{:pay=>:post},:collection=>{:print=>:get}
  map.resources :users,:has_many=>:addresses,
    :collection=>{:check_login=>:get,:check_email=>:get,:agent_list=>:get,:apply_agent=>:get},
    :member=>{:list_role=>:get,:update_role=>:post,:change_password=>:get,
    :update_password=>:post,:update_agent_status_apply=>:post,:update_agent_status_pass=>:post,
    :activation_agent=>:get,:edit_agent=>:get,:update_agent_status_withdraw=>:post,:generate_code=>:get}
  map.resource :session
  map.resources :categories
  
  map.simple_captcha '/simple_captcha/:action', :controller => 'simple_captcha'
    

  

  # The priority is based upon order of creation: first created -> highest priority.

  # Sample of regular route:
  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   map.resources :products

  # Sample resource route with options:
  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }

  # Sample resource route with sub-resources:
  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller

  # Sample resource route with more complex sub-resources
  #   map.resources :products do |products|
  #     products.resources :comments
  #     products.resources :sales, :collection => { :recent => :get }
  #   end

  # Sample resource route within a namespace:
  #   map.namespace :admin do |admin|
  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  #     admin.resources :products
  #   end

  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
  # map.root :controller => "welcome"

  # See how all your routes lay out with "rake routes"

  # Install the default routes as the lowest priority.
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end
